#ifndef RULES_H
#define RULES_H

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "hashtable.h"

typedef struct ruler_t* ruler;


/* Adds "port-protocol" rule to the ruler*/

void addRule(ruler _ruler, int port, char* protocol);

/* gets the protocol related to the given port. Case no matching rule is found  NULL returned*/ 
char* protocolByPort(ruler _ruler, int port);


ruler createRuler();

void destroyRuler(ruler _ruler);

#endif

